<?php
	/*Gérald Plusquellec*/
	class controller_forget
	{
		public $controller;
		public $action;
		
		public function __construct()
		{
			$this -> controller = controller :: getInstance();
            $this -> action = $action = getvar('**action**');
            $this -> $action();
            $this -> controller -> html();
		}
        
        public function index()
        {            
            $form = form('forget');
            
            if (count($_POST))
            {
                $valid = $form -> isValid($_POST);
                $verifyCaptcha = verifyCaptcha();
                
                if (true === $valid && true === $verifyCaptcha)
                {die('OK');}
                else
                    $form -> populate($_POST);
            }
			
            $f = $form -> render(new Zend_View);
            $f = sanitForm($f);
            $f = addCaptcha($f);
            setvar('__form__', $f);
            
			viewRenderer();
        }
	}
?>